<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title><?php echo ($meta_title); ?>|OneThink管理平台</title>
    <link href="/Public/favicon.ico" type="image/x-icon" rel="shortcut icon">
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/base.css" media="all">
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/common.css" media="all">
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/module.css">
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/style.css" media="all">
    <link rel="stylesheet" type="text/css" href="/Public/Admin/css/table.css" media="all">
	<link rel="stylesheet" href="/Public/Admin/css/fakeLoader.css">
	<link rel="stylesheet" type="text/css" href="/Public/Admin/css/<?php echo (C("COLOR_STYLE")); ?>.css" media="all">
	
	

     <!--[if lt IE 9]>
    <script type="text/javascript" src="/Public/static/jquery-1.10.2.min.js"></script>
    <![endif]--><!--[if gte IE 9]><!-->
    <script type="text/javascript" src="/Public/static/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/jquery.mousewheel.js"></script>
    <script src="/Public/static/thinkbox/laydate.js"></script>
    <script src="/Public/static/echarts.min.js"></script>
    <script src="/Public/static/macarons.js"></script>
	<!-- <script type="text/javascript" src="/Public/static/lte-ie7.js"></script> -->
    <!--<![endif]-->
    
</head>
<body>
    <!-- 头部 -->
    <div class="header">
        <!-- Logo -->
        <span class="logo"></span>
        <!-- /Logo -->

        <!-- 主导航 -->
        <ul class="main-nav">
            <?php if(is_array($__MENU__["main"])): $i = 0; $__LIST__ = $__MENU__["main"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><li class="<?php echo ((isset($menu["class"]) && ($menu["class"] !== ""))?($menu["class"]):''); ?>"><a href="<?php echo (U($menu["url"])); ?>"><?php echo ($menu["title"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <!-- /主导航 -->

        <!-- 用户栏 -->
	
        <div class="user-bar">
            <a href="javascript:;" class="user-entrance"><i class="icon-user"></i></a>
            <ul class="nav-list user-menu hidden">
                <li class="manager">你好，<em title="<?php echo session('user_auth.username');?>"><?php echo session('user_auth.username');?></em></li>
                <li><a href="<?php echo U('User/updatePassword');?>">修改密码</a></li>
                <li><a href="<?php echo U('User/updateNickname');?>">修改昵称</a></li>
                <li><a href="<?php echo U('Public/logout');?>">退出</a></li>
            </ul>
        </div>
		<div class="user-bar">
           <a href="<?php echo U('Ywxt/index',array('jrzjtx'=>100,'p'=>1));?>"  style="color: white; background: #383838;" >
               <i style="display: block;
    margin-top: 15px;
    padding-bottom: 15px;
    width: 45px;
    height: 20px;
    background: url(/Public/Admin/images/email.png) no-repeat;"></i>
               <span style="background: #FF6C60;border-radius: 2px;-webkit-border-radius: 2px;font-size: 10px;font-weight: normal;line-height: 13px;padding: 2px 5px;position: absolute;right: 4px;top: 10px;"><?php echo ($jrzjtx["ts"]); ?></span>
           </a>
        </div>
	    <div class="user-bar">
           <a href="<?php echo U('Ywxt/index',array('jdlstx'=>100,'p'=>1));?>"  style="color: white; background: #383838;" >
               <i style="display: block;
    margin-top: 15px;
    padding-bottom: 15px;
    width: 45px;
    height: 20px;
    background: url(/Public/Admin/images/filter.png) no-repeat;"></i>
               <span style="background: #FF6C60;border-radius: 2px;-webkit-border-radius: 2px;font-size: 10px;font-weight: normal;line-height: 13px;padding: 2px 5px;position: absolute;right: 4px;top: 10px;"><?php echo ($jdlstx["ts"]); ?></span>
           </a>
        </div>
    </div>
    <!-- /头部 -->

    <!-- 边栏 -->
    <div class="sidebar">
        <!-- 子导航 -->
        
            <div id="subnav" class="subnav">
                <?php if(!empty($_extra_menu)): ?>
                    <?php echo extra_menu($_extra_menu,$__MENU__); endif; ?>
                <?php if(is_array($__MENU__["child"])): $i = 0; $__LIST__ = $__MENU__["child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$sub_menu): $mod = ($i % 2 );++$i;?><!-- 子导航 -->
                    <?php if(!empty($sub_menu)): if(!empty($key)): ?><h3><i class="icon icon-unfold"></i><?php echo ($key); ?></h3><?php endif; ?>
                        <ul class="side-sub-menu">
                            <?php if(is_array($sub_menu)): $i = 0; $__LIST__ = $sub_menu;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?><li>
                                    <a class="item" href="<?php echo (U($menu["url"])); ?>"><?php echo ($menu["title"]); ?></a>
                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
                        </ul><?php endif; ?>
                    <!-- /子导航 --><?php endforeach; endif; else: echo "" ;endif; ?>
            </div>
        
        <!-- /子导航 -->
    </div>
    <!-- /边栏 -->

    <!-- 内容区 -->
    <div id="main-content">
        <div id="top-alert" class="fixed alert alert-error" style="display: none;">
            <button class="close fixed" style="margin-top: 4px;">&times;</button>
            <div class="alert-content">这是内容</div>
        </div>
        <div id="main" class="main">
            
            <!-- nav -->
            <?php if(!empty($_show_nav)): ?><div class="breadcrumb">
                <span>您的位置:</span>
                <?php $i = '1'; ?>
                <?php if(is_array($_nav)): foreach($_nav as $k=>$v): if($i == count($_nav)): ?><span><?php echo ($v); ?></span>
                    <?php else: ?>
                    <span><a href="<?php echo ($k); ?>"><?php echo ($v); ?></a>&gt;</span><?php endif; ?>
                    <?php $i = $i+1; endforeach; endif; ?>
            </div><?php endif; ?>
            <!-- nav -->
            

            
	<!-- 标题栏 -->
	<div class="main-title">
		<h2>推广费用展示</h2>

	</div>
    <div class="tools">
            <form action="<?php echo U();?>" method="post">
                选择时间：
                <input type="text" value="<?php echo ($begin); ?>" name="time_start" class="date" style="width:80px;" onclick="laydate()"> - <input type="text" value="<?php echo ($end); ?>" name="time_end" class="date" style="width:80px;" onclick="laydate()">
                <span class="buttons">
                    <input type="submit"  id="submit" class="btn" value="开始查询">
                </span>
				<a  class="btn" href="<?php echo U('add');?>">添加费用</a>
            </form>
			
    </div>

	<!-- 数据列表 -->
	<div class="data-table">
        <div class="data-table table-striped">
<table class="">
    <thead>
        <tr>
		<th class="">日期</th>
        <th class="">百度</th>
		<th class="">360</th>
        <th class="">谷歌</th>
		<th class="">搜狗</th>
        <th class="">大众点评</th>
		<th class="">微博</th>
        <th class="">微信</th>
        <th class="">天猫</th>
		<th class="">神马</th>
        <th class="">顾客推荐</th>
        <th class="">员工推荐</th>
        <th class="">广点通</th>
        <th class="">小红书</th>
        <th class="">美柚</th>
        <th class="">婚礼纪</th>
        <th class="">其他</th>
		<th class="">总计</th>
		<th class="">操作</th>
		</tr>
    </thead>
    <tbody>
	<?php if(!empty($_list)): if(is_array($_list)): $i = 0; $__LIST__ = $_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
			<td><?php echo (date("Y-m-d",$vo["time"])); ?></td>
			<td><?php echo ($vo["baidu"]); ?></td>
			<td><?php echo ($vo["so"]); ?></td>
			<td><?php echo ($vo["google"]); ?></td>
			<td><?php echo ($vo["sogou"]); ?></td>
			<td><?php echo ($vo["dazhong"]); ?></td>
			<td><?php echo ($vo["weibo"]); ?></td>
			<td><?php echo ($vo["weixin"]); ?></td>
			<td><?php echo ($vo["tianmao"]); ?></td>
			<td><?php echo ($vo["smtg"]); ?></td>
			<td><?php echo ($vo["laoguketj"]); ?></td>
			<td><?php echo ($vo["yuangongtj"]); ?></td>
			<td><?php echo ($vo["gdt"]); ?></td>
			<td><?php echo ($vo["xhs"]); ?></td>
			<td><?php echo ($vo["my"]); ?></td>
			<td><?php echo ($vo["hlj"]); ?></td>
			<td><?php echo ($vo["qt"]); ?></td>
			<td><?php echo ($vo['tianmao']+$vo['weixin']+$vo['weibo']+$vo['dazhong']+$vo['sogou']+$vo['google']+$vo['so']+$vo['baidu']+$vo['smtg']+$vo['laoguketj']+$vo['yuangongtj']+$vo['gdt']+$vo['xhs']+$vo['my']+$vo['hlj']+$vo['qt']); ?></td>
			<td>
				<a  title="更新 " class="gengxin"  href="<?php echo U('edit?id='.$vo['id']);?>"><img src="/Public/Admin/images/update.png" alt="更新"></a>
				<a class="confirm ajax-get" title="删除" href="<?php echo U('del?id='.$vo['id']);?>"><img src="/Public/Admin/images/delete.png" alt="删除"></a>
            </td>
		</tr><?php endforeach; endif; else: echo "" ;endif; ?>
		<?php else: ?>
		<td colspan="16" class="text-center"> aOh! 暂时还没有内容! </td><?php endif; ?>
        <tr>
            <td style="background-color:#51D0CA;">总计</td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["baidu"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["so"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["google"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["sogou"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["dazhong"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["weibo"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["weixin"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["tianmao"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["smtg"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["laoguketj"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["yuangongtj"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["gdt"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["xhs"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["my"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["hlj"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj["qt"]); ?></td>
			<td style="background-color:#51D0CA;"><?php echo ($zj['tianmao']+$zj['weixin']+$zj['weibo']+$zj['dazhong']+$zj['sogou']+$zj['google']+$zj['so']+$zj['baidu']+$zj['laoguketj']+$zj['yuangongtj']+$zj['smtg']+$zj['gdt']+$zj['xhs']+$zj['my']+$zj['hlj']+$zj['qt']); ?></td>
			<td style="background-color:#51D0CA;"></td>
           
        </tr>
	</tbody>
    </table>

        </div>
    </div>
    <div class="page">
    </div>

        </div>
        <div class="cont-ft">
            <div class="copyright">
               <!--  <div class="fl" >感谢使用<a href="http://www.gv-photo.com" target="_blank">OneThink</a>管理平台</div>
                <div class="fr">V<?php echo (ONETHINK_VERSION); ?></div> -->
            </div>
        </div>
    </div>
    <!-- /内容区 -->
    <script type="text/javascript">
    (function(){
        var ThinkPHP = window.Think = {
            "ROOT"   : "", //当前网站地址
            "APP"    : "/admin.php?s=", //当前项目地址
            "PUBLIC" : "/Public", //项目公共目录地址
            "DEEP"   : "<?php echo C('URL_PATHINFO_DEPR');?>", //PATHINFO分割符
            "MODEL"  : ["<?php echo C('URL_MODEL');?>", "<?php echo C('URL_CASE_INSENSITIVE');?>", "<?php echo C('URL_HTML_SUFFIX');?>"],
            "VAR"    : ["<?php echo C('VAR_MODULE');?>", "<?php echo C('VAR_CONTROLLER');?>", "<?php echo C('VAR_ACTION');?>"]
        }
    })();
    </script>
    <script type="text/javascript" src="/Public/static/think.js"></script>
    <script type="text/javascript" src="/Public/Admin/js/common.js"></script>
    <script type="text/javascript">
        +function(){
            var $window = $(window), $subnav = $("#subnav"), url;
            $window.resize(function(){
                $("#main").css("min-height", $window.height() - 130);
            }).resize();

            /* 左边菜单高亮 */
            url = window.location.pathname + window.location.search;
            url = url.replace(/(\/(p)\/\d+)|(&p=\d+)|(\/(id)\/\d+)|(&id=\d+)|(\/(group)\/\d+)|(&group=\d+)/, "");
            $subnav.find("a[href='" + url + "']").parent().addClass("current");

            /* 左边菜单显示收起 */
            $("#subnav").on("click", "h3", function(){
                var $this = $(this);
                $this.find(".icon").toggleClass("icon-fold");
                $this.next().slideToggle("fast").siblings(".side-sub-menu:visible").
                      prev("h3").find("i").addClass("icon-fold").end().end().hide();
            });

            $("#subnav h3 a").click(function(e){e.stopPropagation()});

            /* 头部管理员菜单 */
            $(".user-bar").mouseenter(function(){
                var userMenu = $(this).children(".user-menu ");
                userMenu.removeClass("hidden");
                clearTimeout(userMenu.data("timeout"));
            }).mouseleave(function(){
                var userMenu = $(this).children(".user-menu");
                userMenu.data("timeout") && clearTimeout(userMenu.data("timeout"));
                userMenu.data("timeout", setTimeout(function(){userMenu.addClass("hidden")}, 100));
            });

	        /* 表单获取焦点变色 */
	        $("form").on("focus", "input", function(){
		        $(this).addClass('focus');
	        }).on("blur","input",function(){
				        $(this).removeClass('focus');
			        });
		    $("form").on("focus", "textarea", function(){
			    $(this).closest('label').addClass('focus');
		    }).on("blur","textarea",function(){
			    $(this).closest('label').removeClass('focus');
		    });

            // 导航栏超出窗口高度后的模拟滚动条
            var sHeight = $(".sidebar").height();
            var subHeight  = $(".subnav").height();
            var diff = subHeight - sHeight; //250
            var sub = $(".subnav");
            if(diff > 0){
                $(window).mousewheel(function(event, delta){
                    if(delta>0){
                        if(parseInt(sub.css('marginTop'))>-10){
                            sub.css('marginTop','0px');
                        }else{
                            sub.css('marginTop','+='+10);
                        }
                    }else{
                        if(parseInt(sub.css('marginTop'))<'-'+(diff-10)){
                            sub.css('marginTop','-'+(diff-10));
                        }else{
                            sub.css('marginTop','-='+10);
                        }
                    }
                });
            }
        }();
    </script>
    
    <script src="/Public/static/thinkbox/jquery.thinkbox.js"></script>
    

</body>
</html>